ggvote_plot_mfx1 <- function(ames_data,
                             model_ids,
                             d = "cmr_arm_cwu",
                             x1  = "Homeownership",
                             subset_x1 = NULL,
                             ylim = rep(NA_real_, 2L),
                             ytitle = "Marginal Effect",
                             xtitle = "",
                             font_size = 15L) {
  data <- ames_data %>%
    dplyr::filter(model_id == model_ids[1]) %>%
    dplyr::bind_rows(ames_data %>%
                       dplyr::filter(model_id == model_ids[2])) %>%
    dplyr::filter(factor == d) %>%
    dplyr::mutate(Homeownership = ifelse(model_id == model_ids[1],
                                         "Renters",
                                         "Owners"))
  
  ## Subset by x1
  if (not(is.null(subset_x1))) {
    if (all(is.na(ylim))) {
      ylim <- c(min(data$lower, na.rm = TRUE),
                max(data$upper, na.rm = TRUE))
      ylim <- ylim + c(-.1, .1) * abs(diff(ylim))
    }
    
    data <- data %>%
      filter(!!as.name(x1) == subset_x1)
  }
  
  ## Marginal effect
  vote_plot <- data %>%
    ggplot(aes(x = 1,
               y = AME)) +
    geom_point(position = position_dodge(width = 1)) +
    geom_errorbar(aes(ymin = lower,
                      ymax = upper),
                  position = position_dodge(width = 1),
                  width = 0) +
    geom_hline(yintercept = 0, col = "red") +
    facet_grid(. ~ get(eval(x1))) +
    theme(panel.spacing = unit(0.75, "lines"))  +
    theme(text = element_text(size = font_size)) +
    xlim(.5, 1.5) +
    ylim(ylim) +
    ylab(ytitle) +
    xlab("") +
    theme(
      axis.title.x = element_blank(),
      axis.text.x = element_blank(),
      axis.ticks.x = element_blank()
    )
  
  ## Return
  return(vote_plot)
}
